package com.smart.model.convert;

import com.smart.model.dtomapper.ProjectFileTaskDtoMapper;
import com.smart.model.domain.ProjectFileTaskDO;
import com.smart.model.vo.ProjectFileTaskVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class ProjectFileTaskConvert {

    public static List<ProjectFileTaskVO> buildProjectFileTaskVoList(List<ProjectFileTaskDO> projectFileTaskDOList) {
        if (CollectionUtils.isEmpty(projectFileTaskDOList)) {
            return Lists.newArrayList();
        }
        List<ProjectFileTaskVO> projectFileTaskVOList = new ArrayList<>();
        for (ProjectFileTaskDO projectFileTaskDO : projectFileTaskDOList) {
            projectFileTaskVOList.add(ProjectFileTaskDtoMapper.INSTANCE.do2VO(projectFileTaskDO));
        }

        return projectFileTaskVOList;
    }
}
